package com.ldw.demo.controller;


import com.ldw.demo.pojo.Bill;
import com.ldw.demo.service.BillService;
import com.sun.org.apache.bcel.internal.generic.BIPUSH;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class BillController {
    @Autowired
    private BillService billService;

    @RequestMapping("/jsp/bill.do")
    public String queryBill(Model model){
        List<Bill> billList = billService.queryBill();
        model.addAttribute("billList", billList);
        return "billlist";
    }
}
